home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / ear / fraphix1.lha / FraphiX.LHA / FraphiX / rexx / InverteFrame.rexx < prev    next >
OS/2 REXX Batch file  |  1995-08-02  |  2KB  |  91 lines

  1. /* Questo script ARexx serve per invertire l'ordine dei fotogrammi */
  2. /* $VER1.0 */
  3.  
  4. if~show("L","rexxsupport.library") then do
  5.    if addlib('rexxsupport.library',0,-30,0) then
  6.       say "Rexxsupport.library caricata"
  7.    else do
  8.       say "Rexxsupport.library non trovata"
  9.       exit 10
  10.    end
  11. end
  12.  
  13.  
  14. LF = x2c("a")
  15. if exists("Env:FlagARexx") = 0 then do
  16.        say LF || "Invio messaggio: ATTENDI"
  17.        call delay 50
  18. end
  19. say LF || "Scansione in corso..." || LF
  20.  
  21.  
  22. /* Routine di scansione dei Fotogrammi */
  23.  
  24. fotogramma=1
  25. trovato = 0
  26. non_trovato = -1
  27. file = trovato
  28.  
  29. do until (file=non_trovato)
  30.        contatore='0000' || fotogramma
  31.        nome='Fraphix_Store:Frame' || right(contatore,4)
  32.        if exists(nome) = 0 then file = non_trovato
  33.        /* say nome */
  34.        fotogramma = fotogramma + 1
  35. end
  36.  
  37. /* Routine di renumerazione dei Fotogrammi */
  38.  
  39. fotogrammi = fotogramma - 2
  40. say lf || 'Trovati ' || fotogrammi ||' fotogrammi.' ||LF
  41. say 'Rinumerazione in corso...' || lf
  42. if fotogrammi > 0 then 
  43. do contatore = 0 to ((fotogrammi/2)-1)
  44.        fotogramma = fotogrammi - contatore
  45.        nome1 ='Fraphix_Store:Frame' || right('0000' || fotogramma,4)
  46.        fotogramma = contatore + 1
  47.        nome2 ='Fraphix_Store:Frame' || right('0000' || fotogramma,4)
  48.        nome3 ='Fraphix_Store:Frame_Temp'
  49.  
  50.        com1 = 'Rename ' || nome1 || ' as ' || nome3
  51.        com2 = 'Rename ' || nome2 || ' as ' || nome1
  52.        com3 = 'Rename ' || nome3 || ' as ' || nome2
  53.        
  54.        if (nome1 = nome2) = 0 then do
  55.         
  56.          address command com1
  57.          address command com2
  58.          address command com3
  59.         /*
  60.          say com1
  61.          say com2
  62.          say com3
  63.          say lf
  64.          call delay 100
  65.         */
  66.        end
  67.  
  68. end contatore
  69. else do
  70.       say 'Non ci sono Fotogrammi!'
  71. end
  72.  
  73. if exists("Env:FlagARexx") = 0 then do
  74.        say "Invio messaggio: CONTINUA"||LF||"Attesa risposta..."
  75.        call delay 50
  76.  
  77.        address "FRAPHIX"
  78.        options results
  79.        QUIT
  80.  
  81.        if (rc=0) then
  82.              say lf||"Risposta Ricevuta."
  83.             else do
  84.              say lf||"Errore "||rc||lf||result
  85.        end
  86.      
  87.  
  88.        call delay 300
  89.  
  90. end
  91.